angular.module('BaseServer')

.service('BaseEnum', [function(){
    return {
        RowStatus: {
            UnChange: {Value: 0, Text: '未改变'},
            Insert: {Value: 1, Text: '插入'},
            Delete: {Value: 2, Text: '删除'},
            Modify: {Value: 3, Text: '修改'}
        },
        //舍入类型
        RoundType: {
            Empty: {Value: 0, Text: ''},
            AllAdd: {Value: 1, Text: '全部进位'},
            AllDelete: {Value: 2, Text: '全部舍位'},
            AccondValueRound: {Value: 3, Text: '按值舍入'}
        },
        //控件类型
        ControlType: {
            TextBox: {Value: 0, Text: '文本框'},
            CheckBox: {Value: 1, Text: '复选框'},
            NumberBox: {Value: 2, Text: '数值框'},
            PercentBox: {Value: 3, Text: '百分比框'},
            DropDownList: {Value: 4, Text: '下拉框'},
            Refer: {Value: 5, Text: '参照'},
            Calendar: {Value: 6, Text: '日历'},
            Html: {Value: 7, Text: 'Html'}
        },
        //值类型111
        ValueType: {
            String: {Value: 0, Text: '字符串'},
            Number: {Value: 1, Text: '数值'},
            Percent: {Value: 2, Text: '百分比'},
            Boolean: {Value: 3, Text: '布尔'},
            Date: {Value: 4, Text: '日期'},
            Enum: {Value: 5, Text: '枚举'}
        },
        TotalType: {
            Sum: {Value: 0, Text: '求和'},
            Average: {Value: 1, Text: '平均'}
        },
        LoadMode: {
            CacheAndNoPaging: {Value: 0, Text: '全加载并缓存'},        //适合Grid编辑
            CacheAndPaging: {Value: 1, Text: '缓存并分页加载'},        //适合Grid浏览
            NoCacheAndPaging: {Value: 2, Text: '不缓存并分页加载'}     //适合卡片编辑
        },
        DateTimeFormat: {
            DateTime: {Value: 0, Text: '日期时间'},
            Date: {Value: 1, Text: '日期'}
        },
        CompareRelation: {
            No: {Value: 0, Text: '不过滤'},
            Like: {Value: 1, Text: '包含'},
            NotLike: {Value: 2, Text: '不包含'},
            Equal: {Value: 3, Text: '等于'},
            NoEqual: {Value: 4, Text: '不等于'},
            GreatThen: {Value: 5, Text: '大于'},
            LessThan: {Value: 6, Text: '小于'},
            GreatThenEqual: {Value: 7, Text: '大于等于'},
            LessThanEqual: {Value: 8, Text: '小于等于'},
            In: {Value: 9, Text: '在...之中'},
            NotIn: {Value: 10, Text: '不在...之中'},
            Between: {Value: 11, Text: '两者之间'},
            Empty: {Value: 12, Text: '空'},
            NoEmpty: {Value: 13, Text: '非空'}
        },
        SortType: {                             //排序类型
            Empty: {Value: 0, Text: ''},
            Asc: {Value: 1, Text: '升序'},
            Desc: {Value: 2, Text: '降序'}
        }
    };
}]);

